import VueRouter from 'vue-router'
import HomeContainer from './components/tabbar/HomeContainer.vue'
import MemberContainer from './components/tabbar/MemberContainer.vue'
import ShopcarContainer from './components/tabbar/ShopcarContainer.vue'
import SearchContainer from './components/tabbar/SearchContainer.vue'
import NewList from './components/news/NewList.vue'
import newinfo from './components/news/NewInfo.vue'
import photolist from './components/photos/PhotoList.vue'
import photoinfo from './components/photos/photoInfo.vue'
import goodslist from './components/goods/goodslist.vue'
import goodsInfo from './components/goods/goodsInfo.vue'
import goodsDesc from './components/goods/goodsDesc.vue'
import goodsComment from './components/goods/goodsComment.vue'

const router = new VueRouter({
  routes:[
    {path:'/',redirect:'/home'},
    {path:'/home',component:HomeContainer},
    {path:'/home/newlist',component:NewList},
    {path:'/home/photolist',component:photolist},
    {path:'/home/goodslist',component:goodslist},
    {path:'/home/photoinfo/:id',component:photoinfo,props:true},//记得加id
    {path:'/member',component:MemberContainer},
    {path:'/shopcar',component:ShopcarContainer},
    {path:'/search',component:SearchContainer},
    {path:'/home/newinfo/:id',component:newinfo,props:true},
    {path:'/home/goodsInfo/:id',component:goodsInfo,props:true},
    {path:'/home/goodsDesc/:id',component:goodsDesc,props:true},
    {path:'/home/goodsComment/:id',component:goodsComment,props:true,name:'cmt'}

  ],
  linkActiveClass:'mui-active'
});

export default router